package com.testsolution.Utils;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class MyProperties extends Properties {
	private static MyProperties myProperties;

	private MyProperties() throws IOException {
		InputStream stream = MyProperties.class.getClassLoader().getResourceAsStream("/WEB-INF/lib/db.properties");
		try {
			this.load(stream);
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
		}
	}

	public static MyProperties getInstance() throws IOException {
		if (null == myProperties) {
			myProperties = new MyProperties();
		}
		return myProperties;
	}
}
